<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>{% block title %}Arachnado Web Crawler{% end %}</title>
    <link href="//maxcdn.bootstrapcdn.com/bootswatch/3.3.6/yeti/bootstrap.css" rel="stylesheet">
    <link href="{{ static_url('css/style.css') }}" rel="stylesheet">
</head>

<body>
    <nav class="navbar navbar-default navbar-static-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="{{ reverse_url('index') }}">Arachnado</a>
            </div>

            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li><a id="arachnado-connection-monitor"></a></li>
                    <li id="arachnado-process-stats"></li>
                    <li><a href="#/sites">Known sites</a></li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    {% block nav-help %}<li><a href="{{ reverse_url('help') }}">Help</a></li>{% end %}
                </ul>
            </div>
        </div>
    </nav>
    <div class="container">
        {% block content %}{% end %}
    </div>

    <script>
        window.WS_SERVER_ADDRESS = JSON.parse('{% raw json_encode(reverse_url("ws-updates")) %}');
        window.WS_RPC_ADDRESS = JSON.parse('{% raw json_encode(reverse_url("ws-rpc")) %}');
        window.START_CRAWL_URL = JSON.parse('{% raw json_encode(reverse_url("start")) %}');
        window.STOP_CRAWL_URL = JSON.parse('{% raw json_encode(reverse_url("stop")) %}');
        window.PAUSE_CRAWL_URL = JSON.parse('{% raw json_encode(reverse_url("pause")) %}');
        window.RESUME_CRAWL_URL = JSON.parse('{% raw json_encode(reverse_url("resume")) %}');
        window.INITIAL_PROCESS_STATS = JSON.parse('{% raw initial_process_stats_json %}');
        {% block initial_data %}{% end %}
    </script>

    <script src="//code.jquery.com/jquery-2.2.4.min.js"></script>
    <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

    <script src="{{ static_url('build/vendor.js') }}"></script>
    <script src="{{ static_url('build/common.js') }}"></script>

    {% block js %}{% end %}
</body>
</html>
